<?php

namespace app\api\model\service;

use think\Model;
class GoodsSpu extends Model
{
    // 表名
    protected $name = 'service_goods_spu';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public static function getSpuList($goods_id)
    {
        return self::where(['goods_id'=>$goods_id,'status'=>'normal'])->field('id,name,skudetail')->select();
    }
}